package com.simplefan.meta;

public interface MetaAttribute {

  /**
   * Name of attribute, corresponding of XM_ENTITYDESCRIPTOR.CODE in database.
   * @return
   */
  String getAttributeName();

  /**
   * Display name of attribute, will be showed in UI, corresponding of XM_ENTITYDESCRIPTOR.DISPLAYNAME in database.
   * @return
   */
  String getDisplayName();

  /**
   * Data type of attribute, maybe long, byte, int, float, double, string, etc.
   * @see com.simplefan.meta.tools.MetaConsts
   * @return
   */
  int getDataType();

  /**
   * Default value of attribute.
   * @return
   */
  Object getDefaultValue();

  /**
   * Is user defined or system defined.
   * @return
   */
  int getDataCategory();

  /**
   * Table name of attribute included.
   * @return
   */
  String getTableName();

  /**
   * Table column name of attribute. 
   * @return
   */
  String getTableColumnName();

  /**
   * If attribute represents a dictionary value. its Class ID is MetaClass's Code.
   * @return
   */
  String getDictionaryClassID();

  /**
   * If attribute represents a dictionary value. its attribute Id is MetaClass's Attribute Name.
   * @return
   */
  String getDictionaryAttributeID();

  /**
   * corresponding of XM_ENTITYDESCRIPTOR.ID in database.
   * @return
   */
  long getId();
}
